//package com.tencent.compose.sample
//
//import androidx.compose.foundation.layout.Column
//import androidx.compose.foundation.layout.fillMaxHeight
//import androidx.compose.foundation.layout.fillMaxWidth
//import androidx.compose.foundation.layout.padding
//import androidx.compose.material.Button
//import androidx.compose.material.Text
//import androidx.compose.runtime.Composable
//import androidx.compose.ui.Modifier
//import androidx.compose.ui.graphics.kLog
//import androidx.compose.ui.interop.OhosTrace
//import androidx.compose.ui.unit.dp
//import kotlinx.cinterop.*
//import platform.test725.*
//import kotlin.time.Duration
//import kotlin.time.measureTime
//import platform.test725.kn_string_result
//import platform.test725.kn_string_params
//
//private const val LOOP_COUNT = 10
//
//private const val STR_PARAM: String =
//    "ArkTS: a1aa,Ga,baa,Ja,bb,rb,sb,vb,Bb,eaa,Pb,Vb,bc,cc,dc,ec,fc,hc,lc,faa," +
//            "gaa,nc,qc,Bc,Ec,Kc,Lc,Fc,kd,ud,Ed,Hd,oaa,Wd,raa,taa,ce,oe,uaa,Ee,Ce,Fe,B," +
//            "Xe,af,gf,mf,xf,Cf,Lf,zaa,Aaa,Baa,Caa,Qf,Tf,ag,cg,gg,kg,ng,Gaa,Haa,Iaa,Jaa," +
//            "Kaa,Laa,Gg,Maa,Naa,Og,Sg,Oaa,Taa,Raa,gh,Uaa,Yaa,qh,th,$" +
//            "aa,aba,vh,Jh,eba,fba,Oh,gba,ai,iba,di,pi,jba,kba,qi,ri,si,lba,mba,nba,yi," +
//            "oba,pba,uba,rba,sba,tba,vba,Ai,hi,Mi,Ni,Aba,Cba,Dba,Ri,Fba,Gba,Iba,Jba,Kba," +
//            "Mba,Nba,aa,hj,ij,Oba,kj,Rba,tj,Sba,Tba,Ej,Fj,Uba; _.ba=function(a){return function(){return aa[a].apply(this,arguments)}}; ... qc=function(){return cc("
//
//@OptIn(ExperimentalForeignApi::class)
//@Composable
//internal fun KotlinCallC() {
//    Column(Modifier.fillMaxWidth().fillMaxHeight().padding(30.dp)) {
//        Button(onClick = {
//            val d: Duration = measureTime {
//                OhosTrace.traceSync("testSendDataToC") {
//                    testSendDataToC()
//                }
//            }
//            kLog("dzy 耗时: $d (${d.inWholeMilliseconds} ms)")
//        }) {
//            Text("testSendDataToC")
//        }
//
//        Button(onClick = {
//            val d: Duration = measureTime {
//                OhosTrace.traceSync("testGetDataFromC") {
//                    testGetDataFromC()
//                }
//            }
//            kLog("dzy 耗时: $d (${d.inWholeMilliseconds} ms)")
//        }) {
//            Text("testGetDataFromC")
//        }
//    }
//}
//
//@OptIn(ExperimentalForeignApi::class)
//fun testSendDataToC() {
//    memScoped {
////        val cStr: CPointer<ByteVar> = STR_PARAM.cstr.getPointer(this)
//        repeat(LOOP_COUNT) { kn_string_params(STR_PARAM) }
//    }
//}
//
//
//@OptIn(ExperimentalForeignApi::class)
//fun testGetDataFromC() {
//    memScoped {
//        val p = kn_string_result()?.toKString().orEmpty()
//    }
//}